package functii.trigonometrice;

import functii.Functie;
import functii.elementare.Constanta;
import functii.elementare.Putere;
import operatori.Impartit;
import operatori.Plus;

public class Arccotangenta extends Functie {
	
	public String toString() {
		if (fStang == null)
			System.exit(1);
		return concatTermeni(fStang.toString());
	}

	public String concatTermeni(String aux1) {
		String aux;
		int nrP;
		nrP = aux1.charAt(0) == '(' ? 0 : 2;
		aux = "arcctg";
		if (nrP != 0)
			aux += "(";

		aux += aux1;

		if (nrP != 0)
			aux += ")";

		return aux;
	}
	
	public static String ConcatTermeni(String aux1) {
		String aux;
		int nrP;
		nrP = aux1.charAt(0) == '(' ? 0 : 2;
		aux = "arcctg";
		if (nrP != 0)
			aux += "(";

		aux += aux1;

		if (nrP != 0)
			aux += ")";

		return aux;
	}
	
	
	/*
	public static double Calcul(double aux1) {
		return Math.PI / 2 - Math.atan(aux1);
	}

	public double calcul() {
		if (fStang == null)
			System.exit(1);
		return Calcul(fStang.calcul());
	}

	public double calculDerivata() {
		if (fStang == null)
			System.exit(1);
		return -1.0
				* Impartit.Calcul(fStang.calculDerivata(), Plus.Calcul(1.0,
						Putere.Calcul(fStang.calcul(), new Constanta(2))));
	}

	public String derivare() {
		if (fStang == null)
			System.exit(1);
		return "-"
				+ Impartit.ConcatTermeni(fStang.derivare(), Plus.ConcatTermeni(
						"1", Putere.concatTermeni(fStang.toString(),
								new Constanta(2))));
	}
	*/

}
